package com.huatai.datacenter.controller.test.controller;

import com.huatai.datacenter.controller.test.entity.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/getData")
@Api(tags = "模拟系统A的数据接口", description = "模拟系统A的数据接口")
public class HttpSetSystemAController {
    //重要部位表
    @ApiOperation("重要部位表")
    @GetMapping("/importPartTable")
    public List<ImportPartTable>getImportPartTable(){
        List<ImportPartTable> arrayList = new ArrayList<>();
        arrayList.add(new ImportPartTable("safe-unit-1", "贵阳市红城美元化工有限公司", "观山湖区", "106.672054", "26.624761", "廖凯", "13797146496"));
        arrayList.add(new ImportPartTable("safe-unit-2", "贵阳市名城西苑商贸中心", "云岩区", "106.725746", "26.598694", "肖喜祥", "18585051636"));
        arrayList.add(new ImportPartTable("safe-unit-3", "贵阳市南明海贸商业街", "南明区", "106.750683", "26.571006", "龙溪东", "13344217702"));
        arrayList.add(new ImportPartTable("safe-unit-4", "贵州大学北校区朝阳村", "花溪区", "106.681113", "26.446166", "陆德明", "15015801429"));
        arrayList.add(new ImportPartTable("safe-unit-5", "为明学校保利春天校区", "乌当区", "106.784004", "26.632176", "赵星星", "18908518696"));
        arrayList.add(new ImportPartTable("safe-unit-6", "贵州科学城", "白云区", "106.665476", "26.728426", "孙志祥", "17794045631"));
        arrayList.add(new ImportPartTable("safe-unit-7", "清镇职教城", "清镇市", "106.478118", "26.592793", "孟德禄", "13585519097"));
        arrayList.add(new ImportPartTable("safe-unit-8", "息烽县邬氹工业园区", "息烽县", "106.746317", "27.094682", "敖兴海", "18513361435"));
        arrayList.add(new ImportPartTable("safe-unit-9", "猕天大圣蔬果物流园区", "修文县", "106.615596", "26.828776", "谢天兴", "17785252574"));
        arrayList.add(new ImportPartTable("safe-unit-10", "开磷集团第三磷融工厂", "开阳县", "106.858794", "27.11992", "蒋烈奇", "13115693674"));
        return arrayList;
    }

    //区域水表数据
    @ApiOperation("区域水表数据")
    @GetMapping("/AreaWarterLogin")
    public List<AreaWarterLog>getAreaWarterLogin(){
        List<AreaWarterLog> arrayList = new ArrayList<>();
        arrayList.add(new AreaWarterLog("district-1", "观山湖区", "242", "15"));
        arrayList.add(new AreaWarterLog("district-2", "云岩区", "132", "16"));
        arrayList.add(new AreaWarterLog("district-3", "南明区", "135", "10"));
        arrayList.add(new AreaWarterLog("district-4", "花溪区", "144", "7"));
        arrayList.add(new AreaWarterLog("district-5", "乌当区", "142", "27"));
        arrayList.add(new AreaWarterLog("district-6", "白云区", "158", "21"));
        arrayList.add(new AreaWarterLog("district-7", "清镇市", "266", "16"));
        arrayList.add(new AreaWarterLog("district-8", "息烽县", "137", "18"));
        arrayList.add(new AreaWarterLog("district-9", "修文县", "138", "29"));
        arrayList.add(new AreaWarterLog("district-10", "开阳县", "134", "33"));
        return arrayList;
    }

    //传感器数据
    @ApiOperation("传感器数据")
    @GetMapping("/SensorDataSheet")
    public List<SensorDataSheet>getSensorDataSheet(){
        List<SensorDataSheet> arrayList = new ArrayList<>();

        arrayList.add(new SensorDataSheet("safe-unit-1", "37", "54", "1", "东南风", "12", "14"));
        arrayList.add(new SensorDataSheet("safe-unit-2", "22", "22", "1", "南风", "5117", "2415"));
        arrayList.add(new SensorDataSheet("safe-unit-3", "23", "56", "2", "东南风", "12", "13"));
        arrayList.add(new SensorDataSheet("safe-unit-4", "22", "45", "1", "南风", "14", "15"));
        arrayList.add(new SensorDataSheet("safe-unit-5", "22", "57", "2", "南风", "13", "17"));
        arrayList.add(new SensorDataSheet("safe-unit-6", "24", "53", "2", "东风", "20", "11"));
        arrayList.add(new SensorDataSheet("safe-unit-7", "21", "51", "1", "东风", "15", "18"));
        arrayList.add(new SensorDataSheet("safe-unit-8", "19", "50", "2", "东风", "277", "305"));
        arrayList.add(new SensorDataSheet("safe-unit-9", "20", "51", "2", "东风", "19", "12"));
        arrayList.add(new SensorDataSheet("safe-unit-10", "19", "50", "2", "南风", "15", "15"));

        return arrayList;
    }

    //报警记录表
    @ApiOperation("报警记录表")
    @GetMapping("/AlarmRecordTable")
    public List<AlarmRecordTable>getAlarmRecordTable(){
        List<AlarmRecordTable> arrayList = new ArrayList<>();

        arrayList.add(new AlarmRecordTable("safe-alarm-1", "线路温度异常", "用电隐患告警", "2025/5/30 15:33:41", "safe-unit-1", "已解决"));
        arrayList.add(new AlarmRecordTable("safe-alarm-2", "烟感主机告警异常", "主机告警", "2025/5/30 14:30:30", "safe-unit-2", "已解决"));
        arrayList.add(new AlarmRecordTable("safe-alarm-3", "高位水箱水位异常", "用水隐患告警", "2025/5/31 11:33:11", "safe-unit-5", "已解决"));

        return arrayList;
    }

    //巡检任务分配表
    @ApiOperation("巡检任务分配表")
    @GetMapping("/InspectionTaskDispatchTable")
    public List<InspectionTaskDispatchTable>getInspectionTaskDispatchTable(){
        List<InspectionTaskDispatchTable> arrayList = new ArrayList<>();
        arrayList.add(new InspectionTaskDispatchTable("patrol-ms-1", "执行消防重点部位巡察-贵阳市红城美元化工有限公司",
                "重点部位巡察", "观山湖区", "齐峰", "防火处", "2025/5/30 15:33:41", "2025/5/30 15:38:41", "2025/5/30 15:45:33"));
        arrayList.add(new InspectionTaskDispatchTable("patrol-ms-2", "执行消防重点部位巡察-贵阳市名城西苑商贸中心",
                "重点部位巡察", "云岩区", "齐峰", "防火处", "2025/5/30 14:30:30", "2025/5/30 14:35:30", "2025/5/30 14:37:35"));
        arrayList.add(new InspectionTaskDispatchTable("patrol-ms-3", "执行消防重点部位巡察-为明学校保利春天校区",
                "重点部位巡察", "乌当区", "齐峰", "防火处", "2025/5/31 11:33:11", "2025/5/31 11:38:11", "2025/5/31 11:36:27"));
        return arrayList;
    }

    @ApiOperation("警情记录表（A）")
    @GetMapping("/PoliceRecordForm")
    public List<PoliceRecordForm> getPoliceRecordForm(){
        List<PoliceRecordForm> arrayList = new ArrayList<>();
        arrayList.add(new PoliceRecordForm("1", "贵阳市云岩区未来方舟D3组团南门", "居民区域",
                "社会救助", "云岩区", "2025/5/31 15:10:01", "云岩大队"));
        arrayList.add(new PoliceRecordForm("2", "贵阳市南明区海天装饰大厦B门", "经营场所",
                "抢险救援", "南明区", "2025/5/31 21:15:55", "南明大队"));
        return arrayList;
    }
}
